#ifndef CONTROL_CMD_H
#define CONTROL_CMD_H
#include "stm32f4xx.h"

/****  All is Function ID	*****/
/*   Universal CMD    */
#define  STOP_ONE_MOTO	  		0x01
#define  STOP_ALL_MOTO			0x02
#define  FAST_STOP				0x03
#define  MOTO_POWER_ON			0x04
/*   Universal CMD    */

/*	Speed CMD	*/
#define SET_TAR_SPEED_MORE		0x21	//nodeid = 1:set1-4,nodeid = 2:set5-8
#define SET_MOTO_1TO4			0x01    //this is node id
#define SET_MOTO_5TO8			0x02    //this is node id

#define SET_TAR_SPEED_SINGLE	0x22
#define SET_ACC_DEACC_MAXSPEED	0x23 	//set single moto
/*	Speed CMD	*/


#define Assignment_Pin 			GPIO_PIN_0
#define Assignment_GPIO_Port 	GPIOA

#define KEY_SEND    			HAL_GPIO_ReadPin(Assignment_GPIO_Port,Assignment_Pin)


typedef struct
{
	uint32_t 	pTxMailbox;
	uint8_t 	SrcData[8];
}CAN_TxDATA_t;





void MotoInit(void);
void Control_CMD(void);
void Send_ControlCMD(void);
#endif



